import { QiankunFrame } from '@lhy-assist/qiankun'
import { PlatformFrameAction } from './frame-action'
import { PlatformFrameState } from './frame-state'
import { QiankunAppRegistryConfig } from '@lhy-assist/qiankun'

/**
 * 注册子应用的配置项
 */
export type PlatformAppRegistryConfig = QiankunAppRegistryConfig<PlatformFrameState, PlatformFrameAction>

/**
 * 初始化主应用
 */
export const qiankunFrame = new QiankunFrame<PlatformFrameState, PlatformFrameAction>({
  state: {
    userInfo: {} as any,
  },
  action: new PlatformFrameAction(),
})
